<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>simGetDecimatedMesh</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
</head>

<body>

<div align="center">
<table class=allEncompassingTable >
 <tr>
  <td >
<p><a href="../../index.html" TARGET="_top"><img src="../images/homeImg.png"></a></p>

<h1><a href="../apiOverview.htm">Regular API</a> function</h1>
<h3 class=subsectionBar><a name="simGetDecimatedMesh" id="simGetDecimatedMesh"></a>simGetDecimatedMesh / sim.getDecimatedMesh </h3>
<table class=apiTable>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>Retrieves a decimated mesh (i.e. a simplified mesh). See also <a href="simConvexDecompose.htm">sim.convexDecompose</a> and <a href="simGetQHull.htm">sim.getQHull</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCSyn>
C synopsis
</td> 
<td class=apiTableRightCSyn>simInt simGetDecimatedMesh(const simFloat* inVertices,simInt inVerticesL,const simInt* inIndices,simInt inIndicesL,simFloat** verticesOut,simInt* verticesOutL,simInt** indicesOut,simInt* indicesOutL,simFloat decimationPercent,simInt reserved1,const simFloat* reserved2)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCParam>C parameters</td> 
<td class=apiTableRightCParam>
<div><strong>inVertices</strong>: a pointer to the input vertices (succession of x/y/z values).</div>
<div><strong>inVerticesL</strong>: the number of input vertices times 3.</div>
<div><strong>inIndices</strong>: a pointer to the input indices (3 values for each triangle).</div>
<div><strong>inIndicesL</strong>: the number of input triangles times 3.</div>
<div><strong>verticesOut</strong>: a pointer to a pointer to the output vertices. The output vertices are allocated by CoppeliaSim and the user is in charge of releasing the buffer via <a href="simReleaseBuffer.htm">simReleaseBuffer</a>.</div>
<div><strong>verticesOutL</strong>: a pointer to the number of output vertices times 3.</div>
<div><strong>indicesOut</strong>: a pointer to a pointer to the output indices. The output indices are allocated by CoppeliaSim and the user is in charge of releasing the buffer via <a href="simReleaseBuffer.htm">simReleaseBuffer</a>.</div>
<div><strong>indicesOutL</strong>: a pointer to the number of output indices (i.e. the number of triangles times 3).</div>
<div><strong>decimationPercent</strong>: the percentage of the desired decimation (0.1-0.9).</div>
<div><strong>reserved1</strong>: reserved, set to 0.</div>
<div><strong>reserved2</strong>: reserved, set to nullptr.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCRet>
C return value
</td> 
<td class=apiTableRightCRet>
<div>-1 or 0 if operation was not successful.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>table verticesOut,table indicesOut=sim.getDecimatedMesh(table verticesIn,table indicesIn,number decimationPercentage)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>verticesIn</strong>: a table containing the input vertices (succession of x/y/z values).</div>
<div><strong>indicesIn</strong>: a table containing the input indices (3 values for each triangle).</div>
<div><strong>decimationPercentage</strong>: the percentage of the desired decimation (0.1-0.9).</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div><strong>verticesOut</strong>: a table containing the output vertices (succession of x/y/z values).</div>
<div><strong>indicesOut</strong>: a table containing the output indices (3 values for each triangle).</div>
</td> 
</tr> 
</table> 

<br>
<p><a href="../apiFunctions.htm">All regular API functions on one page</a></p>
<br>
<br>
</td>
</tr>
</table>
</div>
</body>
</html>
